package cn.caplike.demo.spring.bean.lifecycle.aware.interfaces;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Main App
 *
 * @author LiKe
 * @version 1.0.0
 * @date 2020-03-19 09:20
 */
public class Client {

    public static void main(String[] args) {
        AbstractApplicationContext context1 =
                new ClassPathXmlApplicationContext("bean-aware-interfaces.xml");
        AwareBeanImpl awareBeanImpl = (AwareBeanImpl) context1.getBean("awareBean");
        System.out.println("AwareBeanImpl: " + awareBeanImpl);
        context1.registerShutdownHook();
    }

}
